<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>文件上传下载</title>
</head>
<body>
<a th:href="@{/testDown}">下载1.png</a>
<form th:action="@{/testUp}" method="post" enctype="multipart/form-data">
    头像： <input type="file" name="photo">
    <input type="submit" value="上传">
</form>
</body>
</html>